package com.hrma.entity;


import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;

@Data
public class Employee {
    private Integer id;
    @NotBlank(message = "员工编号不能为空！")
//    @Pattern(regexp = "^[A-Z]\\d{5}$",message = "员工编号错误！")
    private String num;
    @NotBlank(message = "员工姓名不能为空！")
    private String name;
    @NotBlank(message = "性别不能为空！")
//    @Pattern(regexp = "^[男,女]",message = "性别只能是男或女！")
    private String sex;
    @NotNull(message = "部门ID不能为空！")
    private Integer departmentId;
    @NotNull(message = "职务ID不能为空！")
    private Integer postId;
    @NotBlank(message = "手机号不能为空！")
//    @Pattern(regexp = "^\\d{11}$",message = "请输入11位数的手机号！")
    private String phone;
    @NotNull(message = "基础工资不能为空！")
    private Integer salaryId;
    @NotNull(message = "入职时间不能为空！")
    private Date entryTime;
    @NotBlank(message = "身份证号不能为空！")
//    @Pattern(regexp = "^\\d{18}$",message = "身份证号错误!")
    private String idCard;
    private String education;
    private String certification;
    private String address;
    private Integer state;
    @NotBlank(message = "员工登入密码不能为空！")
    private String password;
}
